package com.moss.cloud.common.core.exception;

import lombok.Getter;

@Getter
public enum SystemErrorType implements ErrorType {

    SYSTEM_ERROR("-1", "系统异常"),
    SYSTEM_BUSY("000001", "系统繁忙,请稍候再试"),
    INVALID_SIGNATURE("040092","用户令牌已过期或签名错误"),

    GATEWAY_NOT_FOUND_SERVICE("010001", "服务未找到"),
    GATEWAY_ERROR("010002", "网关异常"),
    GATEWAY_CONNECT_TIME_OUT("010003", "网关超时"),

    ARGUMENT_NOT_VALID("010004", "请求参数校验不通过"),
    UPLOAD_FILE_SIZE_LIMIT("010005", "上传文件大小超过限制"),

    DUPLICATE_PRIMARY_KEY("010006","唯一键冲突"),
    SYSTEM_ROLE("010007","系统角色无权删除"),
    NO_UPDATE_SYSTEM_ROLE("010008","系统角色无权修改"),
    SERVER_INVOCATION_403("403","服务调用无权限"),
    UNAUTHORIZED("401","无权访问"),
    NO_LOGIN("405","用户未登录，无权访问"),
    DATE_EMPTY("010015","数据不存在"),
    WX_FAIL("010016","调用微信接口异常"),
    ONE_OF_THEM_EMPTY("010017","【账号，手机号，邮箱，OPENID】不能同时为空"),
    MOBILE_REPEAT("010018","【手机号】已存在"),
    EMAIL_REPEAT("010019","【邮箱】已存在"),
    OPENID_REPEAT("010020","【OPENID】已存在"),
    USER_NAME_REPEAT("010021","【用户名】已存在"),
    ALREADY_LOCK("010022","账号锁定不能重复操作，解锁后继续"),
    NOT_LOCKED("010023","该用户账号未锁定，不能解锁"),
    NO_SUB_DEPT("010024","要查询的部门不是当前用户的下属部门无权限"),
    NO_DEPT("010025","当前用户无部门，无权查看数据"),
    NO_TENANT("010026","当前用户无租户，无权查看数据"),
    NO_ROLE("010027","当前用户无角色，无权查看数据"),
    NO_MENU("010028","当前用户角色无菜单，无权查看数据"),
    AVATAR_FORMAT_ERROR("010029","头像格式错误"),
    USER_NAME_EMPTY("010030","登录账号不能为空"),
    PHONE_EMPTY("010031","手机号不能为空"),
    DEPT_EMPTY("010032","部门不能为空"),
    EXCEL_ERROR("010033","excel导入错误"),
    BUSINESS_ERROR("010034","服务调用异常"),
    PRIMARY_KEY_EMPTY("010035","主键ID为空，不能操作"),
    ROUTE_ID_REPEAT("010036","路由ID重复"),
    PRIMARY_KEY("010037","主键ID不能为空"),
    CODE_NO_ROLE("010038", "角色信息不匹配, 无权查看数据"),
    ROLE_CODE_REPEAT("010039","角色标识已存在"),
    DATA_PERMISSION_EXCEPTION("010040","租户数据权限不足"),
    MENU_PATH_EXIT("010041","菜单路径已存在"),
    CLIENT_AUTH_EMPTY("010042","客户端认证信息不存在"),
    INVALID_GRANT("040003", "无效授权"),
    MD5_ERROR("010043", "数据加密失败"),
    CLIENT_ID_EXIT("010044","客户端ID已存在"),
    UNIQUE_ATTRIBUTE("010045","唯一属性冲突"),
    DICT_GROUP_EMPTY("010046","字典分组不能为空"),
    DICT_KEY_EMPTY("010047","字典KEY不能为空"),
    CHILDREN_NOT_EMPTY("010048","存在下级不能删除，请先删除下级"),
    NO_SUPER_TENANT("010049","不是超级租户无权查看数据"),
    TENANT_NAME_EXIT("010050","租户名称已存在"),
    DEPT_NOT_BELONG_USER("010051","正在操作的部门不属于当前用户子机构，无权操作"),
    NOT_BELONG_TENANT("010052","正在操作的数据不属于当前租户，无权操作"),
    ZIP_CODE_REPEAT("010053","行政编码不能重复"),
    API_TOKEN_ERROR("010054","接口token错误"),
    DUPLICATE_COMMIT("010055","操作过于频繁，请稍后再试"),
    QUERY_PARAM_ERROR("010056","查询参数错误"),
    POSITION_CODE_REPEAT("010057","职位标识已存在"),
    POSITION_CODE_USED("010058","职位代号被使用，不能删除，请先删除相关职位"),
    OLD_PASSWORD_ERROR("010059","旧密码错误"),
    NEW_PWD_CONFIRM_PWD("010060","新密码和确认密码不一致"),
    DATA_SOURCE_EXIT("010061","数据源已存在"),
    NO_SYNC("010062","数据源未同步，无法撤回"),
    SYNC("010063","数据源已同步，请勿重复操作"),
    FLOW_NAME("010064","流程模型名称不能重复"),
    DEPT_NAME_EXIST("010065", "部门名称已存在"),
    SORT_VALUE("010066", "排序字段值不能为0"),
    TASK_STATUS_MATCH("010067", "未匹配到任务状态"),
    CACHE_EXPIRE("010068", "失效时间不能小于等于0"),
    KEY_EMPTY("010069", "key不能为空"),
    VALUE_EMPTY("010070", "数据不能为空"),
    INCR("010071", "递增因子必须大于0"),
    DECR("010072", "递减因子必须大于0"),
    NO_IN_PROGRESS("010073","不是进行中的流程不能审批"),
    NO_OPERATION_PERMISSION("010074","没有数据操作权限"),
    NO_IN_PROGRESS_TASK("010075","您当前审批的节点不是进行中任务，不能操作"),
    MODEL_ADMIN("010076","流程模型结束方式为指定人通过时，指定人不能为空"),
    ;



    /**
     * 错误类型码
     */
    private String code;
    /**
     * 错误类型描述信息
     */
    private String mesg;

    SystemErrorType(String code, String mesg) {
        this.code = code;
        this.mesg = mesg;
    }
}
